package com.ruoyi.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.ProductionMaterialInventoryMapper;
import com.ruoyi.mes.domain.ProductionMaterialInventory;
import com.ruoyi.mes.service.IProductionMaterialInventoryService;

/**
 * 生产物料库存管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class ProductionMaterialInventoryServiceImpl implements IProductionMaterialInventoryService 
{
    @Autowired
    private ProductionMaterialInventoryMapper productionMaterialInventoryMapper;

    /**
     * 查询生产物料库存管理
     * 
     * @param inventoryId 生产物料库存管理主键
     * @return 生产物料库存管理
     */
    @Override
    public ProductionMaterialInventory selectProductionMaterialInventoryByInventoryId(Long inventoryId)
    {
        return productionMaterialInventoryMapper.selectProductionMaterialInventoryByInventoryId(inventoryId);
    }

    /**
     * 查询生产物料库存管理列表
     * 
     * @param productionMaterialInventory 生产物料库存管理
     * @return 生产物料库存管理
     */
    @Override
    public List<ProductionMaterialInventory> selectProductionMaterialInventoryList(ProductionMaterialInventory productionMaterialInventory)
    {
        return productionMaterialInventoryMapper.selectProductionMaterialInventoryList(productionMaterialInventory);
    }

    /**
     * 新增生产物料库存管理
     * 
     * @param productionMaterialInventory 生产物料库存管理
     * @return 结果
     */
    @Override
    public int insertProductionMaterialInventory(ProductionMaterialInventory productionMaterialInventory)
    {
        return productionMaterialInventoryMapper.insertProductionMaterialInventory(productionMaterialInventory);
    }

    /**
     * 修改生产物料库存管理
     * 
     * @param productionMaterialInventory 生产物料库存管理
     * @return 结果
     */
    @Override
    public int updateProductionMaterialInventory(ProductionMaterialInventory productionMaterialInventory)
    {
        return productionMaterialInventoryMapper.updateProductionMaterialInventory(productionMaterialInventory);
    }

    /**
     * 批量删除生产物料库存管理
     * 
     * @param inventoryIds 需要删除的生产物料库存管理主键
     * @return 结果
     */
    @Override
    public int deleteProductionMaterialInventoryByInventoryIds(Long[] inventoryIds)
    {
        return productionMaterialInventoryMapper.deleteProductionMaterialInventoryByInventoryIds(inventoryIds);
    }

    /**
     * 删除生产物料库存管理信息
     * 
     * @param inventoryId 生产物料库存管理主键
     * @return 结果
     */
    @Override
    public int deleteProductionMaterialInventoryByInventoryId(Long inventoryId)
    {
        return productionMaterialInventoryMapper.deleteProductionMaterialInventoryByInventoryId(inventoryId);
    }
}
